package com.emcom.gotour.vo;

import java.io.Serializable;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class ChatVO implements Comparable<Object>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8876392863603439152L;
	private String msn;
	private String qq1;
	private String qq2;
	public String getMsn() {
		return msn;
	}
	public void setMsn(String msn) {
		this.msn = msn;
	}
	public String getQq1() {
		return qq1;
	}
	public void setQq1(String qq1) {
		this.qq1 = qq1;
	}
	public String getQq2() {
		return qq2;
	}
	public void setQq2(String qq2) {
		this.qq2 = qq2;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		ChatVO myClass = (ChatVO) object;
		return new CompareToBuilder().append(this.qq2, myClass.qq2).append(
				this.qq1, myClass.qq1).append(this.msn, myClass.msn)
				.toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof ChatVO)) {
			return false;
		}
		ChatVO rhs = (ChatVO) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.qq2, rhs.qq2).append(this.qq1, rhs.qq1).append(this.msn,
				rhs.msn).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(1298709491, -1396728351).appendSuper(
				super.hashCode()).append(this.qq2).append(this.qq1).append(
				this.msn).toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("qq2", this.qq2).append("msn",
				this.msn).append("qq1", this.qq1).toString();
	}
}
